<template>
  <router-link to="./Generic">asdasd</router-link>
  
  <button @click="dianwo">点我呀</button>
   <RouterView ref="view">

  </RouterView> 
</template>
<script lang="ts">
import { defineComponent,inject,provide , ref } from 'vue'
// import { useLink,useRouter } from 'vue-router'
export default defineComponent({
  el:"app",
  setup(){
    const injectedRoute:any = inject("currentRouteKey")!
    const view = ref(null)
    const dianwo = ()=>{
      injectedRoute.value.path = "/app3"
    }
    return {dianwo,view}
  }
})
</script>